home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-29 | 80.5 KB | 1,941 lines |
- LAN Support Center
-
- Copyright 1994, McAfee, Inc. All rights reserved.
-
- =========================
- Part Two: Crystal Reports
- =========================
-
- 11.0 Practical Crystal Reports
-
- This chapter contains a number of topics on the practical aspects of using
- Crystal Reports to solve typical reporting problems.
-
-
- 11.1 Practical Crystal Reports
-
- This chapter contains a number of topics on the practical aspects of
- using Crystal Reports to solve typical reporting problems. The topics
- are broken down into the following groups:
-
-
- Creating a report Topics on a variety of report creation skills.
-
- Manipulating text and data Topics that show you how to manipulate (copy,
- delete, move, etc.) text and data on your
- report.
-
- Working with graphics and Topics that show you how to size, scale,
- graphic enhancements crop, and fine tune the placement of
- bit-mapped graphics, and how to create, size,
- and position lines, boxes, and tables on
- your report.
-
-
- 11.2 Creating a Report
-
- This section leads you through the following report creation topics:
-
- o Selecting a database
- o Selecting additional databases
- o Linking the databases
- o Understanding the invisible grid
- o Creating margins
- o Inserting fields
- o Selecting fields to move, format, etc.
- o Spacing fields
- o Inserting text
- o Selecting text (to delete, change the font, etc.)
- o Aligning text with fields
- o Inserting blank lines
- o Deleting blank lines
- o Changing field and text fonts
- o Highlighting fields with borders and drop shadows
- o Centering text, field values
- o Inserting page headers and footers
- o Inserting page numbers and other special fields
- o Grouping data
- o Summarizing grouped data
- o Creating group headers
- o Sorting your data
- o Hiding parts of the report when printing
- o Selecting records and groups you want included on your report.
- o Selecting page orientation and paper size
-
- 11.2.1 Selecting a Database
-
- Begin the report creation process by selecting (activating) a database.
- Once activated, the database serves as a source from which you can select
- fields to appear on your report and to be included in report formulas.
-
- Select a database using the New Report command on the File menu.
-
- 11.2.2 Selecting Additional Databases
-
- Crystal Reports allows you to draw data from multiple databases for use in
- a single report. Select the first database you want to use from the Choose
- Database File dialog box that appears when you select New Report from the
- File Menu. Select the second and each additional database using the Add File
- to Report command on the Database menu.
-
- 11.2.3 Linking the Databases
-
- You link databases so that records from one database will match up with
- records from another. For example, if you activate a Customer database and
- an Order database, you link the databases so that orders in the Order
- database can be matched up with the customers who placed the orders (from
- the Customer database).
-
- Links are fields that are common to the two databases. The fields don't
- have to have the same name; but they must have the same structure (size,
- data type), and contain the same kind of data.
-
- o When you activate additional databases using the Database|Add File to
- Report command, Crystal Reports takes you directly to the Define Link dialog
- box. You use this dialog box to establish the link between the database
- you are activating and a database which is already active.
-
- o If you later wish to create new links, or update or delete existing
- links, you use the Database|Links command which takes you to the Links
- dialog box. Use this dialog box for a variety of linking activities.
-
- 11.2.4 Understanding the Invisible Grid
-
- The Report Editor looks very freeform. It looks like you can place anything
- anywhere and hope for good results. But that is not the case. The Editor
- contains an invisible grid which directly affects the placement of data
- fields and text fields.
-
- Think of the grid as a series of row and column coordinates. Crystal Reports
- allows you to place fields and text only at these coordinates, not between
- them. In this way it makes it very easy for you to place and space data on
- your report, and to align text and fields as needed. If you attempt to
- place a report element between grid coordinates, Crystal Reports "snaps" the
- element to the grid (i.e., it moves the element automatically to the
- nearest coordinate).
-
- o When you place a data field in the Report Editor, Crystal Reports
- "snaps" it to the nearest coordinate. Use the arrow keys or the mouse
- to move the fields once they have been placed.
-
- - When you use the arrow keys to move the field, each time you
- press the arrow the field moves one grid position.
- - When you use the mouse to drag the field to a new location,
- Crystal Reports "snaps" the field to the nearest coordinate as the
- field moves.
-
- o When you type text in the Report Editor, Crystal Reports always begins
- the text at a grid coordinate.
-
- - Use the Tab key to move the text; each time you press the Tab
- key the text moves six grid positions
-
- NOTE: Crystal Reports uses a four pixel horizontal grid and a vertical
- grid that is variable, based on the line height assigned to the largest
- font used within a report section.
-
- 11.2.5 Creating Margins
-
- Set margins in Crystal Reports using the Print|Set Printer Margins
- command.
-
- o Crystal Reports uses a dashed line to display your margins in the
- Report Editor and Label Editor.
-
- o The displayed margins are active: they define the outer printing
- limits of the report or label. Crystal Reports will not allow you to place
- or move a field or text so it extends beyond the margins.
-
- o The numeric margin settings appear in both the Mailing Labels dialog
- box and in the Printer Margins dialog box.
-
- o When you create a new report, Crystal Reports uses the non-printing
- areas established for your printer as default margins. For example, if
- your printer specifications indicate that the left quarter inch of a
- page is a non-printing area, Crystal Reports sets the default left margin
- at .25 inches. While you can set margins that fall inside the non-printing
- areas, parts of your report may be clipped off if you do.
-
- o All margins are calculated from the paper edge. Thus, a left margin
- of .25 inches causes the printing to start exactly one quarter inch in
- from the edge of the paper.
-
- 11.2.6 Inserting Fields
-
- Insert fields on your report using the Database Field command on the
- Insert menu.
-
- 11.2.7 Selecting Fields to Move, Format, etc.
-
- To do many things with a field (change the font, move it, etc.), first you
- must to select it. Select means to point to the element with the mouse
- and then to click the left mouse button to choose the element as the
- object of the next menu selection. For example, to change font size, you
- first select the element for which you want to change the font size. Then
- you select the Font option from the Format menu (or Change Font from the
- right mouse button menu) to select the new font size. The new font size
- applies only to the field you selected.
-
- When you select a field, black handles appear on the field box. These
- handles indicate that the field is selected, and therefore active.
-
- 11.2.8 Selecting Multiple Fields at One Time
-
- To select multiple fields at one time, press the Shift key and, while
- keeping it depressed, click the various fields you want to select. Handles
- will appear on each field selected. You can then move or delete the fields
- as a group. You can also change the font or formatting or add borders
- for all selected fields.
-
- 11.2.9 Spacing Fields
-
- Set spacing between data fields by placing the fields where you want
- them in the Report Editor (using the mouse or Arrow keys), checking your
- spacing using the Print|Print to Window command, and then fine-tuning the
- spacing, again in the Report Editor.
-
- 11.2.10 Spacing Considerations
-
- The following items that can affect column spacing:
-
- o Field size - The amount of space allotted for a field may be much greater
- than the size of the value that appears in the field.
-
- - In a number or dollar amount field (which is right justified
- by default), this can create a large number of leading blank
- spaces which can impact field spacing.
- - In all other fields (which are left justified by default), it
- can create a large number of trailing blank spaces which can
- impact field spacing.
-
- You can reduce the amount of space allotted for a field by selecting the
- field and then resizing it using the mouse or a Shift-Left Arrow or
- Shift-Right Arrow key combination.
-
- o Mouse - To reduce the size of a field in the Report Editor using the
- mouse, select the field and then drag either of the handles to make the
- field box smaller.
-
- o Shift-Left Arrow key - To reduce the size of a field in the Report
- Editor using the Shift-Arrow key combination, select the field, press the
- Shift key, and, while keeping it depressed, press the Left Arrow key enough
- times to reduce the field to the desired size.
-
- NOTE: If you have set up a data block of fields in the Report Editor
- (i.e., Customer/Address/City in a customer list report), you can resize
- all of the fields simultaneously once. First, click each of the fields while
- holding down the Shift key. Then resize the fields by dragging on one of the
- sizing handles from any of the selected fields (using the mouse) or by using
- the Shift-Arrow key combination.
-
- o Alignment - Number and dollar amount fields are right justified by
- default; all other data types are left justified. A right aligned field
- following a left aligned field may appear to be spaced properly in the Report
- Editor. You may need to fine tune the spacing, however, once you review
- the report in the Print Window.
-
- 11.2.11 Inserting Text (Titles, Labels, etc.)
-
- You can add text to your report by typing it at the insertion point and
- then moving it into place or, by using the Insert|Text Field command.
-
- Use the following procedure to insert text directly on your report:
-
- 1. Move the I-beam cursor to the line on which you wish to enter text.
-
- 2. Click the left mouse button to set the insertion point at the left
- margin of the Report Editor.
-
- 3. Type in your text.
-
- 4. Move the I-beam cursor in front of the text, click to set the insertion
- point and push the text into position using the Tab key.
-
- Use the following procedure to insert text using a text field:
-
- 1. Select Insert|Text Field.
-
- The Edit Text Field dialog box appears.
-
- 2. Enter your text in the Enter Text edit box, and click OK when finished.
-
- A rectangular placement cursor appears and changes into a field box
- when it enters the Report Editor.
-
- 3. Position the field box where you want the text field to appear and
- click the left mouse button to place it.
-
- NOTE: By default, Crystal Reports automatically places a title in the
- Page Header section to identify each field or formula field you insert in
- your report. These titles are simply text fields. As such, they can be
- moved, formatted, deleted, resized, or edited to change the text.
-
- o For fields, the default title is the name of the field.
- o For formulas, the default title is the name of the formula.
-
- The left edge of each title aligns with the left edge of the field
- it identifies. Automatic titles can be toggled off and on via the Insert
- Detail Field Titles option in the Options dialog box.
-
- 11.2.12 Selecting Text (To Delete, Change the Font, etc.)
-
- To do many things with text (change the font, delete it, etc.), first you
- must to select it. Select means to highlight the text by dragging the
- I-beam cursor over it while holding down the left mouse button. Your next
- action (changing the font, selecting Edit|Cut, etc.) acts upon the text
- selected.
-
- NOTE: When text is in a text field, you select it as you would select
- any field.
-
- 11.2.13 Aligning Text with Fields
-
- Often in reporting, you may find yourself wanting to align text with column
- data (that you entered as fields or formula fields). To do this, place
- your fields, type your text, and then move the text into position using the
- Tab key. It is important to understand why you use the Tab key to perform
- this function and not the Space Bar. Spaces on the screen take up a
- different amount of space than spaces on the printer. Thus, what looks like
- it is aligned on screen (using the Space Bar) may not be aligned when you
- print. If text and fields are aligned to a given tab stop on screen, however,
- the elements will also be aligned when you print. Since both elements are
- aligned to the same tab stop, a tab expansion can affect only the absolute
- position of the elements on a page, not their alignment relative to each
- other.
-
- To align text with fields, you move the text, the field, or both.
-
- o Move the text with the Tab key. Each time you press the Tab key the
- text moves six grid positions.
-
- o Move the fields with the Arrow keys. Each time you press one of the
- Arrow keys, the text moves one grid position.
-
- NOTES: a - If you want to center the text over a field, or right or
- left align it, you can type the text into a text field and use the
- Format|Field alignment commands to set the alignment of the text within
- the text field.
- b - Text can be moved right and left (with the Tab and Backspace
- keys) as can fields (with the Right Arrow and Left Arrow keys). By moving
- text and fields in concert, you should be able to get good alignment easily.
- c - To align field titles with fields, working from left to right is
- best. Make certain the first title is aligned with its field, then align the
- second title with its field, etc. Aligning, in this case, consists of
- aligning the left edge of the title with the left edge of the field.
- d - For the best (and easiest) alignment of text and field data,
- enter your text elements as text fields using the Insert|Text Field command
- (instead of entering the text directly onto the report).
-
- 11.2.14 Inserting Blank Lines
-
- To insert a blank line, move the I-beam cursor to the section in which
- you want to enter the blank line, click the left mouse button to set the
- insertion point, and press Enter one time for each blank line you want to
- insert.
-
- Considerations:
-
- o If you place the insertion point before text and then press Enter,
- the blank lines will appear above the text.
-
- o If you place the insertion point after text and then press Enter,
- the blank lines will appear below the text.
-
- o If you place the insertion point before or after a field and then
- press Enter, the blank lines will always appear below the field. If you
- want to insert blank lines above the field, insert the number of blanks
- you need below the field as indicated, and then move the field down to
- the bottom blank line you have just created.
-
- NOTE: You can also add blank lines by dragging the section boundary to
- increase section size.
-
- 11.2.15 Deleting Blank Lines
-
- By default the Report Editor allots three lines for the Page Header section
- and three lines for the Page Footer section of your report. The defaults
- may allot more lines than you need for those items on your report.
-
- Additionally, you may expand a section on your report by a random number
- of lines prior to inserting text and data, just to make sure you have
- enough room for your entries. You may find that you have added more lines
- than necessary.
-
- Printing the report without first deleting the unneeded blank lines can
- leave gaps in your report that make the report less attractive visually
- and more difficult to read.
-
- To delete unneeded blank lines:
-
- o If an entire section is blank (i.e., if you aren't putting anything
- into the Page Footer section of your report), you can eliminate the
- allotted blank lines by eliminating the entire report section via the Hide
- Section option of the Format Section command.
-
- o If you have text and/or data in a section and just want to remove the
- extraneous blank lines, click the I-beam cursor on the blank line you want
- to delete. This sets the insertion point. Once the insertion point is set,
- press the Backspace key (the key that deletes the previous character);
- Crystal Reports deletes the line on which the insertion point is set.
-
- NOTE: You can also delete blank lines by dragging the section boundary to
- decrease section size.
-
- 11.2.16 Changing Field and Text Fonts
-
- You can change fonts quickly for any field value or text string in your
- report using the Font dialog box.
-
- Use the following procedure to change fonts for a field value.
-
- 1. Select the field(s) for which you want to change the font.
-
- o To select a single field, click the field.
- o To select multiple fields, hold the Shift key down while you
- click the fields.
-
- Handles appear on the selected field(s).
-
- 2. Select Format|Font or click the right mouse button and select Change
- Font from the pop-up menu.
-
- The Font dialog box appears.
-
- 3. Make the font, style, size, color, and/or effects changes you want
- and click OK when finished.
-
- Use the following procedure to change fonts for a text string:
-
- 1. With the left mouse button depressed, drag the I-beam cursor over the
- text of interest to select it.
-
- 2. Select Format|Font or click the right mouse button and select Change
- Font from the pop-up menu.
-
- The Font dialog box appears.
-
- 3. Make the font, style, size, color, and/or effects changes you want and
- click OK when finished.
-
- 11.2.17 Highlighting Fields with Borders and Drop Shadows
-
- Crystal Reports makes it easy for you to highlight your data with borders
- and drop shadows, and color.
-
- Use the following procedure to create borders, drop shadows, and add field
- color:
-
- 1. Select the field(s) you want to highlight.
-
- o To select a single field, click the field.
- o To select multiple fields, hold the Shift key down while you
- click the fields.
-
- Handles appear on the selected field(s).
-
- 2. Select Format|Border and Colors or click the right mouse button and
- select Change Border and Colors from the pop-up menu.
-
- The Format Border and Colors dialog box appears.
-
- 3. Set up the text color, fill (field color), border, and drop shadow you
- want.
-
- 4. Click OK when finished to return to the Report Editor.
-
- The selected fields will be highlighted to your specifications.
-
- NOTE: If you selected multiple fields, the same highlights will be applied
- to all fields. If you want to highlight different fields differently, you
- must select and highlight each unique field individually.
-
- 11.2.18 Centering Text, Field Values
-
- To center text and field values, you use the Crystal Reports' alignment
- command.
-
- Use the following procedure to center text under a title, over the body of
- the report, etc.
-
- 1. Select Insert|Text Field and create a text field that contains the
- text you want.
-
- 2. Place the text field in the approximate position you want it to appear
- on the report.
-
- 3. Change the font, font size, and font style for the text field if you
- wish.
-
- 4. Resize the text field box so it matches the margins within which you
- wish to center the text.
-
- For example, if you want to center text beneath a report title, expand
- the field box so it's the same size as the report title (or report
- title field box). If you want to center a header entry over the body of
- the report, expand the header entry field box so it's the same width as
- the data in your report.
-
- 5. Select Format|Field, and then select centered from the Alignment box in
- the Field Format dialog box when it appears.
-
- 6. Select OK when finished; Crystal Reports centers your text within the
- expanded field box.
-
- Use the following procedure to center a field value within the space
- allotted for the field:
-
- 1. Select the field whose value you want to center.
-
- 2. Change the font, font size, and font style for the field if you wish.
-
- 3. Select Format|Field, and then select centered from the Alignment box
- in the Field Format dialog box when it appears.
-
- 4. Select OK when finished; Crystal Reports centers the field value within
- the space allotted for the field.
-
- 11.2.19 Inserting Page Headers and Footers
-
- In many cases, you may want to include information at the top and bottom
- of each page of your report.
-
- o At the top of the report (page header) you may want to include such
- things as the report title, the report date, the range of dates covered by
- the report, etc.
-
- o At the bottom of the report (page footer) you may want to print the page
- number, the author's name, "Confidential," etc.
-
- Crystal Reports makes it easy for you to include such header and footer
- information.
-
- 11.2.20 To Insert Page Headers and Footers
-
- You insert page headers and footers by placing the desired information in
- the appropriate section of the report editor.
-
- o header information goes in the Page header section
- o footer information goes in the Page footer section
- o Any information you place in these sections prints on each page of the
- report (unless you take special steps to prevent some printing).
- o You can use text, fields, or formulas in these sections just as you can
- in the Details section.
-
- 11.2.21 To Format Page Headers and Footers
-
- You can format each element in a header or footer in the same way you
- would format that element if it appeared in the details section:
-
- o you can change the font for text, fields, or formulas (see Format|Font),
-
- o you can center the values horizontally on the page, center them over
- your report data, or align them flush left, centered, or flush right
- within the space allotted for them,
-
- o you can change the way dates, numbers, and currency appear when they
- print, (see Format|Field) and
-
- o you can suppress any blank lines that occur in the section (see
- Format|Section).
-
- To format a header or footer element, select the element and then select
- the formatting option of interest.
-
- 11.2.22 Inserting Page Numbers and Other Special Fields
-
- Crystal Reports lets you insert special fields in your reports (in addition
- to the data fields you draw from databases). These special fields allow you
- to insert dates, page numbers, and group and record numbers in your report.
-
- Print Date Field Use Insert|Print Date Field to insert a field
- that prints whatever is the current date when
- the report prints.
-
- Page Number Field Use Insert|Page Number Field to insert a field
- that prints the current page number.
-
- Record Number Field Use Insert|Record Number Field to have Crystal
- Reports number each record printed in the Details
- section of your report.
-
- Group Number Field Use Insert|Group Number Field to have Crystal
- Reports number each group in your report.
-
-
- When you select any of these special fields, a rectangular placement cursor
- appears. Move the cursor to the point where you want to insert the field and
- click the left mouse button to place it.
-
- 11.2.23 Grouping Data
-
- Grouping data means breaking your data into meaningful groups before it
- appears on your report. Crystal Reports makes it easy:
-
- o to group your data, and
- o to evaluate or perform calculations on the data in each group should
- you so wish.
-
- 11.2.24 Simple Grouping
-
- Simple grouping means breaking the data into groups without performing any
- additional action (totaling, averaging, etc.) on the grouped data.
-
- o On a customer list, for example, you may want to group your data by
- state for use by your customer service or telemarketing personnel. Crystal
- Reports can quickly organize your data into state groups so that each group
- contains only customers from a single state.
-
- o On a sales report you may want to group data by salesrep (each group
- containing only sales made by a single salesrep) or by customer (each group
- containing only sales made to a single customer). Crystal Reports
- gives you the flexibility to group data in a variety of ways.
-
- NOTE: Whenever Crystal Reports groups data, it first sorts the data, and
- then it breaks the sorted data into groups. For example, if you want to
- group a customer list by state, Crystal Reports first sorts the data by
- state. Then it begins a new group whenever the state changes. The following
- data shows that process.
-
- If all you want to do is group your data, you can do this easily with
- Crystal Reports using the Insert|Group command.
-
- Use the following procedure to do simple grouping:
-
- 1. Select the field you want to group.
-
- For example:
-
- - if you want to group a customer list by state, select the field
- that contains the company name, or
- - if you want to group an orders report by customer, select the
- field that contains the order amount.
-
- 2. Select Insert|Group Section. The Insert Group Section dialog box appears.
-
- 3. In the top scroll box, select the field that you want to trigger a
- grouping, whenever its value changes.
-
- For example:
-
- - if you want to group a customer list by state, select the state
- field, or
- - if you want to group an orders report by customer, select the
- field that contains the customer name or customer number.
-
- 4. In the second scroll box, select the sort direction (in ascending order
- = A to Z, 0 to 9, in descending order = Z to A, 9 to 0).
-
- 5. If you selected a date or Boolean field in the top scroll box, a third
- scroll box appears near the bottom of the dialog box. In this
- scroll box, select the date or Boolean condition that finalizes your
- subtotal specification.
-
- 6. Select OK when finished. Crystal Reports sorts the data and then breaks
- it into groups according to your specifications.
-
- NOTE: You can tell that the data is grouped because two new sections
- appear in the Report Editor bracketing the Details section.
-
- 11.2.25 Nesting Groups
-
- You may also want to nest groups of data: group data within a group.
- For example, on a customer list, you may want to group your data by state,
- and then, within each state group, break the data down further, by city.
-
- Crystal Reports lets you do this easily: you use the Insert|Group Section
- command two times, first to set up the state group and then to set up the
- city group.
-
- NOTE: You can add additional nesting levels as needed; there is no
- practical limit to how many nesting levels you can set up.
-
- Use the following procedure to group using nesting groups.
-
- 1. Select the field you want to group.
-
- For example:
-
- - if you want to group a customer list by state and then, within
- each state group, group the list by city, select the field that
- contains the company name, or
- - if you want to group an orders report by customer and then,
- within each customer group, group the list by date, select the
- field that contains the order amount.
-
- 2. Select Insert|Group Section.
-
- The Insert Group Section dialog box appears.
-
- 3. In the top scroll box, select the field that you want to trigger a
- grouping, whenever its value changes.
-
- For example:
-
- - if you want to group a customer list by state and then by city,
- select the state field, or
- - if you want to group an orders report by customer and then by
- date, select the field that contains the customer name or customer
- number.
-
- 4. In the second scroll box, select the sort direction (in ascending order
- = A to Z, 0 to 9, in descending order = Z to A, 9 to 0)
-
- 5. If you selected a date or Boolean field in the top scroll box, a third
- scroll box appears near the bottom of the dialog box. In this
- scroll box, select the date or Boolean condition that finalizes your
- subtotal specification.
-
- 6. Select OK when finished.
-
- Crystal Reports groups the data according to the first set of
- specifications.
-
- 7. Select the same field you selected in Step 1.
-
- 8. Select Insert|Group Section again.
-
- The Insert Group Section dialog box appears.
-
- 9. This time select the field you want to trigger the second group (the
- group within the group) whenever its value changes.
-
- For example:
-
- - if you want to group a customer list by state and then by city,
- select the city field, or
- - if you want to group an orders report by customer and then by
- date, select the date field.
-
- 10. Select the sort direction (ascending = A to Z, 0 to 9, descending =
- Z to A, 9 to 0).
-
- 11. Select OK when finished. Crystal Reports groups the data, this time
- using both sets of specifications.
-
- 12. Repeat Steps 6 to 10 for each additional group you want to set up.
-
- 11.2.26 Summarizing Grouped Data
-
- Sometimes you may want to go beyond mere grouping of data. You may want to
- first group the data and then evaluate or perform calculations on the data
- in each group. You may want to sum, average, or count the values, calculate
- the variance or standard deviation of the values, or determine the highest
- (maximum) or lowest (minimum) value in each group.
-
- o You can sum the data using the Insert|Subtotal or Insert|Summary commands.
-
- o You can sum, average, count, calculate the variance or standard
- deviation, or determine the maximum or minimum values using the
- Insert|Summary commands.
-
- NOTE: Not all summary options are available for every data type. For
- example, you cannot sum or average string fields.
-
- 11.2.27 Grouping and Summarizing Grouped Data
-
- 1. Select the field you want to group.
-
- For example:
-
- - if you want to group a customer list by state and then count the
- number of values in each group, select the field that contains
- the company name, or
- - if you want to group an orders report by customer and then
- determine the average sized order for each customer, select the
- field that contains the order amount.
-
- 2. Select Insert|Summary.
-
- The Insert Summary dialog box appears.
-
- 3. In the top scroll box, select the action you want to take on the
- grouped data.
-
- For example:
-
- - if you want to count the number of values in each group, select
- Count, or
- - if you want to average the values in each group, select Average.
-
- 4. In the next scroll box, select the field that you want to trigger a
- grouping, whenever its value changes.
-
- For example:
-
- - if you want to group a customer list by state, select the state
- field, or
- - if you want to group an orders report by customer, select the
- field that contains the customer name or customer number.
-
- 5. In the next scroll box select the sort direction (ascending = A to Z,
- 0 to 9, descending = Z to A, 9 to 0).
-
- 6. If you selected a date or Boolean field in the top scroll box, a
- third scroll box appears near the bottom of the dialog box. In this
- scroll box, select the date or Boolean condition that finalizes your
- summary specification.
-
- 7. Select OK when finished. Crystal Reports sorts the data, and then groups
- and summarizes it to your specifications.
-
- 11.2.29 Grouping and Summarizing Using Nesting Groups
-
- 1. Select the field you want to group.
-
- For example:
-
- - if you want to group and count a customer list by state and then,
- within each state group, group and count the list by city, select
- the field that contains the company name, or
- - if you want to group and sum an orders report by customer and
- then, within each customer group, group and sum the list by date,
- select the field that contains the order amount.
-
- 2. Select Insert|Summary.
-
- The Insert Summary dialog box appears.
-
- 3. In the top scroll box, select the action you want to take on the grouped
- data.
-
- For example:
-
- - if you want to count the number of values in each group, select
- Count, or
- - if you want to average the values in each group, select Average.
-
- 4. In the next scroll box, select the field that you want to trigger a
- grouping, whenever its value changes.
-
- For example:
-
- - if you want to group a customer list by state, select the state
- field, or
- - if you want to group an orders report by customer, select the
- field that contains the customer name or customer number.
-
- 5. In the next scroll box select the sort direction (ascending = A to Z,
- 0 to 9, descending = Z to A, 9 to 0).
-
- 6. If you selected a date or Boolean field in the top scroll box, a third
- scroll box appears near the bottom of the dialog box. In this scroll box,
- select the date or Boolean condition that finalizes your summary
- specification.
-
- 7. Select OK when finished. Crystal Reports groups and summarizes the data
- to your specifications.
-
- 8. Select the same field you selected in Step 1.
-
- 9. Select Insert|Summary.
-
- The Insert Summary dialog box appears.
-
- 10. Select the action you want to take on the grouped data.
-
- 11. This time select the field you want to trigger the second group (the
- group within the group) whenever its value changes.
-
- For example:
-
- - if you want to group and count a customer list by state and then
- by city, select the city field, or
- - if you want to group and sum an orders report by customer and
- then by date, select the date field.
-
- 12. Select the sort direction (ascending = A to Z, 0 to 9, descending = Z
- to A, 9 to 0).
-
- 13. Select OK when finished. Crystal Reports groups and summarizes the data
- to your specifications.
-
- 14. Repeat Steps 8 to 14 for each additional group you want to set up.
-
- NOTE: Group values (subtotals, summaries) and grand totals are
- automatically formatted to match as closely as possible the formatting of
- the field they are summarizing.
-
- 11.2.30 Creating Group Headers
-
- Just as Crystal Reports allows you to place a header at the top of each
- page, it also allows you to place incremental headers above each group in
- your report. This feature allows you to give your reports a polished,
- professional appearance.
-
- Whenever you group your data, or insert a subtotal or a summary, Crystal
- Reports creates two new sections on your report.
-
- o One section, the Group Footer section, appears below the Details section.
- This section holds the group value field itself.
-
- o A matching section, the Group Header section appears above the Details
- section. Anything you place in this section will appear as a header for your
- group.
-
- NOTE: Both sections are given the same designation so you can tell that
- they are tied together. The two sections are also tied together visually.
-
- o If you put text in the Group Header section, the same text will appear
- as a header for each group on the report.
-
- o If you put the field in the Group Header section that you use for the
- sort and group by field, Crystal Reports will create a "live" header for
- each group. For example, if you have a subtotal that groups your data by
- Customer, putting a duplicate copy of the Customer field in the Group Header
- section for that subtotal heads each group with the customer name. You can
- then format this header field to make it stand out if you wish, using a
- larger point size, bold face or italics, etc.
-
- NOTE: You can hide either the Group Header section or the Group Footer
- section for any group by activating the Hide Section option available via
- the Format|Section command.
-
- 11.2.31 Multiple Groups for the Same Field
-
- When you set up a second group for the same field, Crystal Reports creates
- a second group section on your report beneath the first group section.
- Likewise, it creates a second Group Header section above the first Group
- Header section. For each new group field section on an existing field,
- Crystal Reports creates a pair of sections that effectively "bracket" the
- existing sections. Each section is clearly marked so you can easily tell
- which header section goes with each group section.
-
- If you place headers in each of the Group Header sections, you produce a
- report that is extremely easy to read. For example, if you have grouped your
- data by State and then by City within each state, each new State section will
- be headed by a State header, and each City section within the State section
- will be headed by a City header.
-
- 11.2.32 Sorting Your Data
-
- Crystal Reports allows you to sort your data by record and by group. This
- section discusses each of the sorting procedures in depth.
-
- NOTE: Crystal Reports sorts your data using the sorting rules appropriate
- to the country that you have selected in the International dialog box in the
- Windows Control Panel.
-
- 11.2.33 Sorting by Record
-
- Crystal Reports gives you the ability to sort your data on one or more sort
- fields. Single and multiple field sorts will be covered in this section.
-
- Single field sorts are sorts in which all the data in the report is sorted
- based on the values in a single field. Sorting an inventory report by stock
- number and sorting a customer list by customer number are examples of single
- field sorts.
-
- In a multiple field sort, Crystal Reports first sorts the entries
- (alphabetic or numeric) in the first field selected, putting them in
- ascending or descending order as specified. Then it sorts any entries in
- the second field that can be sorted without disturbing the sort order of
- entries in the first field. It then sorts any entries in the third field
- that can be sorted without disturbing the sort order of the entries in the
- first two fields. It follows the same pattern for sorting additional fields.
-
- Use the following procedure to sort by record:
-
- 1. Select Print|Record Sort Order.
-
- The Sort Order dialog box appears.
-
- 2. Select the Sort Field(s) and Sort Direction you want and click OK
- when finished.
-
- Crystal Reports sorts the records to your specifications.
-
- NOTE: If you group your data using the Insert|Group, Insert|Subtotal,
- or Insert|Summary command, Crystal Reports sorts your data automatically,
- as part of the grouping process. For example, if you sort a customer
- list by state, Crystal Reports first sorts the list alphabetically by state,
- before breaking it into state groups. In such a case, you do not need to use
- the Print|Record Sort Order command to generate the sorting.
-
- 11.2.34 Sorting Groups
-
- Crystal Reports allows you to change the order in which groups appear on
- your report. You can:
-
- o base the sort on any group (subtotal or summary) in your report, and
- o sort your report so that groups appear in ascending or descending order.
-
- When you group data, Crystal Reports first sorts the data by record and
- then groups it according to your specifications. Here is some data typical
- of that found in the {file.STATE} field of a customer list:
-
- In order to group the data by state, Crystal Reports sorts the original
- data alphabetically by state, on the first pass, and then it breaks the
- data into groups (whenever the value in the state field changes) on the
- second pass. The resulting groups appear in ascending alphabetical order;
- the group containing all the customers from Arizona comes before the group
- containing all the customers from Colorado. Now this is fine if you want
- the groups appearing in that order. But let's assume we want the data
- grouped so that the group containing the most records (the state with the
- most customers) appears first, then the state with the second highest
- number of records, then the third, etc. Crystal Reports lets you do this
- easily using the Print|Group Sort Order command.
-
- Use the following procedure to sort groups.
-
- 1. Select the Print|Group Sort Order command.
-
- The Sort Order dialog box appears, listing all the groups that you have
- set up in your report. In our example above, since customer data is
- grouped by state and the number of records in each state group is
- counted, a group name similar to this will appear in the Summary Fields
- box:
-
- Group #n:customer.STATECount of customer.CUSTNAME
-
- Translated, this means that the {customer.CUSTNAME} field (the field
- that contains the customer name) is grouped and counted every time the
- value in the {customer.STATE} field changes.
-
- 2. Select this group, click the Add button.
-
- Crystal Reports places it in the Sort Fields box and activates the Sort
- Direction options.
-
- 3. Since you want the largest groups (by count) to appear first and the
- smallest last, select Descending. If you wanted the smallest groups
- to appear first, you would select Ascending.
-
- 4. Click OK when finished.
-
- Crystal Reports sorts the groups to your specifications.
-
- NOTE: When you sort by group, nothing happens to the sort order of the
- records within a group; only the relative positions of the groups
- themselves change.
-
- 11.2.35 Hiding Parts of the Report when Printing
-
- Crystal Reports has four formatting commands that suppress (hide) various
- parts of a report. Each of these commands is discussed individually in
- Crystal Reports Help. The purpose of this section is to show the differences
- between the commands and how you can use them together to achieve
- sophisticated report formatting.
-
- The four commands are:
-
- Suppress if Duplicated Suppress if Duplicated (Field format dialog box)
- prevents a field value from printing if it is
- identical to (a duplicate of) the value that comes
- immediately before it. The value doesn't print but
- the space in which it would have printed remains.
-
- Suppress if Zero Suppress if Zero (Format Number/ Currency dialog
- boxes) prevents a value from printing if it is a
- zero value. The value doesn't print but the space
- in which it would have printed remains.
-
- Suppress Blank Lines Suppress Blank Lines (Format Section dialog box)
- eliminates nonessential blank lines from your report.
-
- Hide when Printing Hide when Printing (Field format dialog box) prevents
- a field from printing. The field doesn't print but
- the space allotted for the field remains.
-
- 11.2.36 Selecting Records and Groups to Include on Your Report
-
- You can include all records in your report, or you can restrict your
- report to specific records or groups of records. For example, you can
- print a sales report showing year to date sales for all sales reps in the
- country, or you can print a report that presents nationwide sales but only
- for the last month, or even a report that shows year to date sales but
- only for those sales reps in Texas and California. Your reports can be as
- inclusive or exclusive as you wish.
-
- Crystal Reports includes four commands on the Print menu for selecting
- records and groups.
-
- - Select Records
- - Select Groups
- - Edit Record Selection Formula
- - Edit Group Selection Formula
-
- o Using the first two commands, Crystal Reports generates a selection
- formula for you automatically, based on your specifications.
-
- o Using the last two commands, you create your own selection formula
- using the Formula Editor.
-
- 11.2.37 Generating a Selection Formula Automatically
-
- The Select Records and the Select Groups commands automatically generate
- record selection formulas based on your responses to dialog box questions.
- These commands require no knowledge of the Crystal Reports formula language.
-
- When you're using these commands, you select a field/group value and
- respond to questions about how you want to limit that field or group value.
- For example, if you want to prepare a report limited to Texas customers,
- you first click the state field in the customer database. Then, you select
- Print|Select Records (or choose Select Records from the right mouse button
- menu). When the Select Records dialog box appears you enter your selection
- criteria in the dialog box.
-
- Use the following procedure to have Crystal Reports generate your selection
- formula:
-
- 1. Select the first field/group value you want Crystal Reports to use
- for determining the records/groups to be included in the report.
-
- 2. Select Print|Select Records or Print|Select Groups, whichever is
- appropriate.
-
- NOTE: Alternately, you can select a field or group value and click the
- right mouse button menu. Select Records appears on the right mouse button
- menu whenever a field is selected, and Select Groups appears on the right
- mouse button menu whenever a group value is selected.
-
- The Select Records or Select Groups dialog box appears, depending on your
- selection.
-
- 3. Enter your selection criteria in the dialog box and click OK when
- finished to return to the Report Editor.
-
- 4. Repeat Steps 1-3 for each additional field/group value you want the
- program to use for selecting records/groups.
-
- Crystal Reports will generate a selection formula based on your
- specifications and limit the report to the records or groups you have
- specified.
-
- NOTE: To view or edit the selection formula generated by Crystal Reports,
- select Print|Edit Record Selection Formula or Print|Edit Group Selection
- Formula, whichever is appropriate to your selection.
-
- 11.2.38 Creating a Selection Formula Manually
-
- The Edit Record Selection Formula and Edit Group Selection Formula commands
- take you to the Formula Editor so you can manually create your own
- selection formula. Both of these commands require some understanding of the
- Crystal Reports formula language.
-
- Using the Formula Editor, you can build a formula that restricts your
- report to the records or groups you specify. For example, to limit your
- report to those records with a customer number greater than 099999, you
- would build a record selection formula similar to this:
-
- {file.CustNumb} >> "099999"
-
- To limit your report to those groups with a subtotal on the Amount column
- (triggered by changes in the CustNumb field) less than $10,000, you would
- build a group selection formula similar to this:
-
- Sum({file.Amount},{file.CustNumb}) << $10000
-
- NOTE: If you select:
-
- Grouped by file.CustNumb
- Sum of file.Amount
-
- (the group field of interest in this example) from the Field list, Crystal
- Reports automatically inserts everything into the formula with the exception
- of <<$10000.
-
- You can also restrict the records used in the report by date. For example,
- to restrict an invoice report to invoices from a specific month, May 1991
- in this case, you would build a record selection formula similar to this:
-
- {file.Date}>>=Date(1991,05,01) and
- {file.Date}<<Date(1991,06,01)
-
- or this:
-
- {file.Date} in Date(1991,04,30) to Date(1991,06,01)
-
- or this:
-
- Month({file.Date}) = 5
-
- You can make your selection formulas as simple or complex as you wish.
- You can use most of the functions and operators available for building any
- formula. Your only restrictions are:
-
- o your record or group selection formula must be Boolean (i.e., it
- must return a Yes (True) or No (False) value). If you build a selection
- formula that isn't Boolean, you get a Formula Compiler Error that says,
- "The result of the selection formula must be a yes/no value."
-
- o it cannot use the PageNumber, GroupNumber, or RecordNumber functions,
- and it cannot use a Subtotal, Grand Total, or Summary.
-
- 11.2.39 Selecting Date Ranges
-
- When you wish to select records based on a range of dates, you can use any
- of Crystal Reports' preset date ranges, or you can build a custom range to
- fit your needs. For a complete list of Crystal Report date ranges, please
- see Crystal Reports Help.
-
- 11.2.40 Generating Your Own Selection Formula
-
- 1. Select Print|Edit Record Selection Formula or Print|Edit Group Selection
- Formula.
-
- The Formula Editor appears.
-
- 2. Create your selection formula.
-
- 3. Click Accept when you are finished.
-
- Crystal Reports will limit your report to the records/groups specified.
-
- NOTE: You will find a number of selection formula templates in the Help
- facility under Edit Record Selection Formula. These templates cover a wide
- range of typical record selection needs, and they can be pasted into the
- Formula Editor via the Windows clipboard. Once they're in the Formula Editor,
- you can change the formulas to fit your data.
-
- 11.2.41 Selecting Page Orientation and Paper Size
-
- You can use Crystal Reports with a variety of paper sizes and with portrait
- or landscape page orientation. You select paper sizes and page orientation
- via the Print Setup dialog box which appears when you select Print|Select
- Printer.
-
- Use the following procedure to select a new paper size/page orientation:
-
- o To select a new paper size and/or page orientation, you select
- Print|Select Printer.
-
- o When the Print Setup dialog box appears, you activate the printer you
- want to use if it is not already the default printer.
-
- o You select your page orientation (Portrait or Landscape) in the
- Orientation box, and you select your paper size and source in the Paper
- box. Your choice of paper sizes depends on the capabilities of the printer
- you have selected, and the choice changes from printer to printer.
- For example, the HP LaserJet driver (PCL) offers a choice of letter, legal,
- executive or A4 paper sizes whereas the PostScript printer driver lets you
- choose from letter, letter small, legal, A4, A4 small, B5, and note paper
- sizes. When you make your selection and return to Crystal Reports, the paper
- you have selected is active.
-
-
- 11.3 Manipulating Text and Data
-
- This section outlines the various procedures to use for manipulating
- (copying, deleting, moving, etc.) text and data on your report.
-
- 11.3.1 Adding Text
-
- To add text, set the insertion point where you want the new text to begin,
- and type in your addition, or use a text field (Insert|Text Field command).
-
- 11.3.2 Copying Text
-
- Use the following procedure to copy text.
-
- 1. Select the text you want to copy by dragging the I-beam cursor over the
- text.
-
- 2. Select Edit|Copy.
-
- Crystal Reports moves a copy of the selected text to the Clipboard
- without disturbing the highlighted text.
-
- 3. Set the insertion point where you want to insert the copied text and
- select Edit|Paste.
-
- Crystal Reports copies the text at the selected point.
-
- NOTE: You can also copy text to the Clipboard using the fifth button on
- the Button Bar. You can also paste text into your report from the clipboard
- using the sixth button on the Button Bar.
-
- 11.3.3 Deleting Text
-
- Use the following procedure to delete text.
-
- o set the insertion point where you want to begin deleting, and press the
- Delete key enough times to delete the unneeded text, or
-
- o select the text you want to delete by dragging the I-beam cursor over it,
- then:
- - select Edit|Clear (or press Delete) to delete it permanently, or
- - select Edit|Cut (or press Shift-Delete) to cut the text to the
- clipboard for later use, or
-
- o set the insertion point at the beginning of a line of text you want to
- delete and press Shift-End to select the entire line. Then:
-
- - select Edit|Clear (or press Delete) to delete it permanently,
- - or select Edit|Cut (or press Shift-Delete) to cut the text to
- the clipboard for later use.
-
- 11.3.4 Editing Text
-
- Delete, edit, and/or add text as needed following the techniques described
- above.
-
- 11.3.5 Moving Text
-
- You can move text in Crystal Reports in two different ways:
-
- o By pushing or pulling it to a new position using the Tab key.
- o By cutting it to the clipboard and then pasting it in a new position.
-
- 11.3.6 Using the Tab Key
-
- Set the insertion point immediately in front of the text you want to move.
-
- o Press the Tab key to move the text to the right. All text to the right
- of the insertion point moves each time you press the Tab key.
-
- o Press the Backspace key to move the text to the left. All text to the
- right of the insertion point moves each time you press the Tab key.
-
- NOTE: If you want to move several pieces of text on a given line into
- position (i.e., aligning titles with data fields), begin at the left. Move
- the leftmost text into position, reset the insertion point to the left of
- the second text element and move it into position, reset the insertion
- point to the left of the third text element, etc.
-
- 11.3.7 Using Cut and Paste
-
- 1. Select the text you want to move.
-
- 2. Select Edit|Cut.
-
- Crystal Reports moves the text to the Clipboard.
-
- 3. Set the insertion point to the new text position.
-
- 4. Select Edit|Paste to paste the text at the new insertion point.
-
- 11.3.8 Moving Fields
-
- You move a database field by dragging it to a new position with the mouse,
- or by selecting it and using the Arrow keys.
-
- 11.3.9 Moving Fields with a Mouse
-
- 1. Select the field you want to move.
-
- o To select a single field, click the field.
-
- o To select multiple fields, hold the Shift key down while you
- click the fields. Handles appear on the selected field(s).
-
- 2. With the cursor on the field (on one of the fields if you have selected
- multiple fields) and the left mouse button depressed, move the field to
- its new position.
-
- 3. Release the mouse button when the field is in place.
-
- 11.3.10 Moving Fields with the Arrow keys
-
- 1. Select the field you want to move.
-
- o To select a single field, click the field.
- o To select multiple fields, hold the Shift key down while you
- click the fields.
-
- Handles appear on the selected field(s).
-
- 2. Use the Arrow keys to move the field to its new position.
-
- The field moves one grid position each time you press the Arrow key.
-
- NOTES: a - Crystal Reports allows you to move fields across other fields
- without affecting the placement of the bottom fields.
- b - You can move fields between sections with the following
- exceptions:
- - grand totals cannot be moved outside the Grand Total section, and
- - a subtotal or summary can be moved only within its initial
- section or to the header portion of its initial section.
-
- 11.3.11 Deleting Fields
-
- You can delete a database field from your report by selecting it and:
-
- o pressing the Delete key on the keyboard,
- o selecting Delete Field from the right mouse button pop-up menu, or
- o selecting Clear from the Edit menu.
-
- Each of these methods has the same effect: deleting the selected field. You
- may find one alternative to be more convenient at one time while a different
- alternative is more convenient at another.
-
-
- 11.4 Working with Graphics and Graphic Enhancements
-
- This section leads you through the following graphics-related topics:
-
- o Bit-mapped graphics concepts,
- o Inserting and moving graphics,
- o Sizing and scaling graphics,
- o Cropping graphics,
- o Creating, moving, and formatting graphic lines
- o Creating, moving, and formatting graphic boxes
- o Using graphic boxes to highlight data
- o Creating tables using graphic lines and boxes
- o Graphic elements and the Status Bar
- o Using the status bar when positioning a graphic element
-
- 11.4.1 Bit-mapped Graphics Concepts
-
- Bit-mapped graphics are the kind of graphics (pictures, logos, etc.) that
- are generally produced by paint programs and scanners. They are composed
- by the graphic designer as a pattern of tiny dots (pixels) on screen, and
- they are printed as a pattern of tiny dots on your report. Even though
- there are some limitations to what an individual can create with dots, a
- skilled graphics designer can nonetheless achieve some stunning effects
- that can add visual impact to your report.
-
- Crystal Reports allows you to use bit-mapped graphics in your reports
- from a wide variety of sources:
-
- o scanners,
- o paint programs,
- o video capture cards,
- o screen capture programs,
- o CompuServe,
- o commercial graphics developers, and
- o shareware and public domain graphics suppliers.
-
- As long as the graphic is stored in one of the popular graphics formats
- that work with Crystal Reports, you can use it in your report.
-
- - Most paint, scanner, screen capture, and video capture programs
- can save graphics in one of the compatible file formats (.bmp,
- .pcx, .gif, .tif, and .tga).
-
- - Additionally, many programs (paint programs, graphics conversion
- programs, screen capture programs, draw programs) will allow you to
- import a graphic in a different format and save it in a format that
- is compatible with Crystal Reports.
-
- - There are, in fact, many low cost shareware programs or free
- public domain programs that allow you to easily convert a bit-mapped
- graphic stored in one format to another.
-
- Crystal Reports was designed for maximum graphics compatibility.
-
- NOTES: a - When you select a graphic for inclusion in your report, Crystal
- Reports stores a copy of the graphic in the report file. Any changes you
- make to the graphic affect the copy; they do not alter the original.
- b - When you click the right mouse button with the cursor over a
- graphic, a graphic options menu appears with the name and extension of the
- originating graphic file at the top. The file name is for information only
- since the graphic in your report is only a copy of the original. That copy is
- stored as part of the report and no longer has a separate file name. Any
- changes you make to the graphic affect the copy only; they do not alter the
- original.
-
- 11.4.2 Inserting, Moving, and Deleting Graphics
-
- Crystal Reports enables you to insert, move, and delete graphics with ease.
- You can insert graphics anywhere you want them to appear on your report.
-
- Use the following procedure to insert a graphic.
-
- 1. Select Insert|Graphic (or click the Insert Graphic button on the
- button bar).
-
- The Choose Graphic File dialog box appears.
-
- 2. Select the graphic you want to enter in your report, and click OK when
- finished.
-
- Crystal Reports returns you to the Report Editor, and an outline the
- size of the graphic appears as an aid in placement.
-
- 3. Position the outline where you want the graphic to appear and click the
- left mouse button to place it.
-
- Crystal Reports displays the graphic where you placed it.
-
- You can move a graphic in one of two ways:
- o using the mouse
- o using the dialog box
-
- Move a graphic with the mouse if you want to determine its final placement
- visually.
-
- o To move a graphic using the mouse, click the graphic and, keeping the
- left mouse button depressed, drag the graphic to the place you want it.
-
- NOTES: a - You can move the graphic within its current section, or move
- it to a new section if you wish. The position of the upper left hand corner
- of the graphic (not the position of the arrow) determines the section in
- which the graphic will appear.
- b - Make sure you don't click the graphic on the handles. If you do,
- you will resize the graphic when you drag it.
-
- Move a graphic using the dialog box if you want the graphic to appear at
- an absolute position on your report.
-
- 1. Select the graphic you want to move and select Format|Graphic to call
- up the Graphic Format dialog box. (Alternately you can double click
- the graphic to call up the dialog box or select the graphic and then
- select Change Format from the right mouse button menu.)
-
- 2. Click the Position button.
-
- The Graphic Position dialog box appears. This dialog box indicates the
- position of the graphic relative to the top left corner of its section.
-
- o To position the graphic even with the top left corner (the top
- flush against the top of the section, the left side flush against
- the left side of the section), enter the following settings:
- Top 0.00, Left 0.00.
-
- o To move the graphic to the right, increase the Left setting. For
- example, to move the graphic in two inches from the left edge of the
- section, enter 2.00 for the Left setting (assuming you're working
- in inches).
-
- o To move the graphic down in the section, increase the Top setting.
- For example, to move the graphic down two inches from the top of
- the section, enter 2.00 for the Top setting.
-
- NOTE: Crystal Reports automatically resizes the section to accommodate
- the new graphic location.
-
- 3. Click OK when finished to return to the Graphic Format dialog box, and
- click OK once there to return to the Report Editor.
-
- Your graphic will be positioned according to your specifications.
- Crystal Reports makes it easy for you to delete a graphic from your report.
-
- Use the following procedure to delete a graphic.
-
- 1. Select the graphic you want to delete.
-
- 2. Select Edit|Clear, press the Delete key, or select Delete Graphic from
- the right mouse button menu.
-
- 11.4.3 Sizing and Scaling Graphics
-
- Size and Scaling are two interrelated options that appear in the Graphic
- Format dialog box.
-
- o Size refers to the absolute length and width of a graphic. If the original
- graphic is one inch wide, it has an absolute width of one inch. If you double
- the width of the graphic it has an absolute width of two inches.
-
- o Scaling refers to the length and width of a graphic as a percentage of
- the original length and width. If the original graphic is one inch wide, it
- has a width scaling value of 100%. If you double the width of the graphic,
- it has a width scaling value of 200%.
-
- o When you first place a graphic, Crystal Reports presents it in its
- original size (the size in which it was saved).
-
- - When you change the size values in the Graphic Format dialog box,
- Crystal Reports adapts the scaling values to the new height and/or
- width.
-
- - When you change the scaling values in that dialog box, the
- program adapts the size values to the new height and/or width.
-
- - When you resize the graphic using the mouse, the program adapts
- the size values and the scaling values in the dialog box to the new
- height and/or width.
-
- When you select a graphic for placement, Crystal Reports presents an
- outline that indicates the original size of the graphic (the size in which
- it was saved). When you place the outline, the graphic replaces the frame.
- You can then enlarge or reduce the size of the graphic to fit your needs.
-
- You have two options for doing this:
- o using the mouse, and
- o using the Format|Graphic command.
-
- You can expand or reduce the size of the graphic using a mouse via the
- sizing handles that appear on the sides and corners of the graphic when you
- select it. (To select a graphic, you click it with the left mouse button.)
-
- The sizing handles provide you a very straightforward means of resizing
- your graphic:
-
- o The handles on the right and left sides of the graphic expand or reduce
- the width of the graphic without affecting the height. For example, if your
- graphic was a square initially, it becomes a rectangle with the top and
- bottom becoming longer than the sides (if expanded) or shorter than the
- sides (if reduced). This kind of sizing results in a graphic that has
- different proportions than the original.
-
- o The handles on the top and bottom of the graphic expand or reduce the
- height of the graphic without affecting the width. For example, if your
- graphic was a square initially, it becomes a rectangle with the sides
- becoming longer than the top and bottom (if expanded) or shorter than the
- top and bottom (if reduced). This kind of sizing also results in a graphic
- that has different proportions than the original.
-
- o The handles on the corners of the graphic expand or reduce the height
- and width of the graphic equally. If your graphic was originally a square,
- it remains a square even though it has been resized. This kind of sizing
- results in a graphic that retains the same proportions as the original.
-
- Use the following procedure to resize using a mouse.
-
- 1. Click the graphic to select it. Handles appear on the sides and the
- corners.
-
- 2. Resize the graphic by dragging on the appropriate handle.
-
- You can resize your graphic in two different ways using the Graphic
- Format dialog box:
- o resizing a graphic to an absolute size, and
- o scaling a graphic to a percentage of its original size.
-
- Use the following procedure to resize a graphic to an absolute size.
-
- 1. Click the graphic to select it and then select Format|Graphic to call
- up the Graphic Format dialog box.
-
- (Alternately you can double click the graphic to call up the dialog
- box or select the graphic and then select Change Format from the right
- mouse button menu.)
-
- 2. Enter the new height and/or width in the Size box.
-
- 3. Click OK when finished.
-
- Crystal Reports resizes your graphic to your new specifications.
-
- Use the following procedure to resize a graphic as a percentage of its
- original size:
-
- 1. Click the graphic to select it and then select Format|Graphic to call
- up the Graphic Format dialog box.
-
- (Alternately you can double click the graphic to call up the dialog box
- or select the graphic and then select Change Format from the right mouse
- button menu.)
-
- 2. Enter the new scale value for the height and/or width in the Scaling box.
-
- 3. Click OK when finished.
-
- Crystal Reports resizes your graphic to your new specifications.
-
- NOTES: a - When you change the Size values, the Scaling values won't
- change while the dialog box is open. Also, when you change the Scaling
- values, the Size values won't change while the dialog box is open. The
- changes will appear the next time you open the dialog box.
- b - Crystal Reports automatically resizes the appropriate report
- section to accommodate the resized graphic.
-
- 11.4.4 Cropping Graphics
-
- Cropping refers to "cutting away" those portions of your graphic that you
- don't want to print. If, for example, when you scanned your company logo
- from a letterhead you also scanned in some extraneous material (company
- address, corporate officers, etc.), you will probably want to "sanitize"
- the logo before you use it. Using Crystal Reports cropping capability, you
- can easily cut away the extraneous material leaving only the logo to print.
-
- There are two ways to crop a graphic:
- o using the mouse
- o using the dialog box
-
- Using the mouse is the easiest way to crop a graphic. It doesn't require
- any guesswork and you see your results immediately on screen.
-
- You crop by dragging the resizing handles while depressing the Shift key.
-
- o When you drag the top handle down, you cut off part of the top part of
- the graphic.
- o When you drag the bottom handle up, you cut off part of the bottom part
- of the graphic.
- o When you drag the right side handle to the left, you cut off part of the
- right side of the graphic.
- o When you drag the left side handle to the right, you cut off part of the
- left side of the graphic.
- o When you drag one of the corner handles into the graphic, you cut off
- part of two sides of the graphic at once (the top and a side, or the bottom
- and a side).
- o When you drag any of the handles away from the graphic (dragging the top
- handle up, the left handle to the left, etc.) you expand the frame and put
- white space between the graphic and the frame.
-
- Use the following procedure to crop a graphic using the mouse.
-
- 1. Select the graphic you want to crop.
-
- Sizing handles appear on the graphic.
-
- 2. With the Shift key depressed, crop your graphic by dragging the
- appropriate sizing handle(s).
-
- 3. When finished, release the Shift key, resize the graphic if needed,
- and move the cropped graphic into place.
-
- NOTE: Resizing a graphic does not undo the cropping. It simply resizes
- that portion of the graphic that remains after cropping.
-
- When you crop a graphic using the dialog box, you specify (in inches or
- centimeters) the piece of the graphic that Crystal Reports is to cut from
- the top, bottom, right, and/or left side.
-
- NOTE: This method of cropping can be particularly useful if you want to
- take a specific sized piece off each side of your graphic. For example, if
- you want to cut exactly one inch off all four sides of your graphic, you
- can do it more quickly and accurately with the dialog box than the mouse.
-
- Use the following procedure to crop a graphic using the dialog box.
-
- 1. Select the graphic you want to crop and select Format|Graphic to
- call up the Graphic Format dialog box.
-
- (Alternately you can double click the graphic to call up the dialog
- box or select the graphic and then select Change Format from the right
- mouse button menu.)
-
- 2. In the Cropping box, enter the amount you want to crop from the Top,
- Left, Bottom, and/or right sides of your graphic.
-
- o Enter positive numbers to cut parts off your graphic.
- o Enter negative numbers to expand the frame, leaving white
- space between the frame and the graphic.
-
- NOTE: All cropping settings apply to the size of the original graphic.
- If the graphic has been resized before cropping, make certain you use the
- Original Size settings as guidelines when entering your new cropping
- instructions. As a general rule, when you are going to crop and resize a
- graphic, crop the graphic first, and then resize it.
-
- 3. Click OK when finished.
-
- Crystal Reports returns you to the Report Editor with the Graphic
- cropped to your specifications.
-
- NOTE: While there are many options in the Graphic Format dialog box, to
- crop a graphic you only need to concern yourself with the cropping
- instructions. Crystal Reports automatically maintains the scale and
- adjusts the absolute size of the graphic so it will display and print to
- your specifications.
-
- - To restore a cropped graphic to its original size and shape,
- change all of the Cropping of original settings to 0.00.
-
- - To restore a resized graphic to its original size and shape,
- change both Scaling settings to 100%.
-
- - To restore a cropped and resized graphic to its original size
- and shape, change both the cropping and the scaling settings as
- described above.
-
- 11.4.5 Creating, Moving, and Formatting Lines
-
- Crystal Reports enables you to create freeform lines that you can use to
- highlight field data, blocks of data, or entire sections of your report.
-
- Use the following procedure to create a line.
-
- 1. Click Insert|Line.
-
- A pencil cursor appears.
-
- 2. Set the tip of the cursor (the pointed end) where you want the line to
- begin and drag the cursor horizontally or vertically with the left
- mouse button depressed.
-
- The line appears as you drag the cursor.
-
- 3. Release the mouse button when the line is the length you want it.
-
- NOTE: To format the line (set line style, width, and color), you use the
- Format|Line command.
-
- 11.4.6 Moving a Line
-
- You can move a graphic line using the mouse, or with the keyboard using the
- arrow keys.
-
- Use the following procedure to move a line using the mouse.
-
- 1. Click the line to select it.
-
- NOTE: When selecting a line or other graphic, the mouse cursor must be an
- Arrow. Make sure the cursor changes to an arrow before you attempt to
- select a line.
-
- 2. Drag the line where you want it.
-
- Make sure to keep the left mouse button depressed as you move it.
-
- 3. Release the mouse button once your line is in position.
-
- Use the following procedure to move a line with the arrow keys.
-
- 1. Click the line to select it.
-
- 2. Use the arrow keys to move the line up, down, right, or left and
- position it where you want it.
-
- NOTE: Crystal Reports displays line coordinates in the Status Bar to help
- you adjust the size and position of a line. Using the status bar readings,
- you can easily place a line at a specific location on your report, or
- align two or more graphic elements with each other.
-
- 11.4.7 Formatting a Line
-
- Crystal Reports allows you to specify the style, width, and color for each
- graphic line you include in your report. You enter your line formatting
- specifications in the Line Format dialog box.
-
- Use the following procedure to format a graphic line.
-
- 1. Select the line of interest and then select Format|Line. (Alternately,
- you can double click the line or select Change Format from the right
- mouse button menu.)
-
- The Line Format dialog box appears.
-
- 2. Enter your formatting instructions for the line.
-
- 3. Click OK when finished.
-
- Crystal Reports returns you to the Report Editor with the line formatted
- to your specifications.
-
- 11.4.8 Resizing a Line
-
- Once you have created a line, you can adjust its length using either the
- mouse or the keyboard arrow keys.
-
- Use the following procedure to resize a line using the mouse.
-
- 1. Select the line you wish to resize.
-
- 2. Move the mouse so that the cursor is over one of the square sizing
- handles at the endpoints of the line.
-
- NOTE: When the mouse cursor is over one of the sizing handles, it changes
- to a double headed arrow (the Resizing cursor).
-
- 3. Drag the handle until the line is the length you want.
-
- Use the following procedure to resize a line using the arrow keys.
-
- 1. Using the mouse, select the line you want to resize.
-
- 2. While holding down the Shift key, press:
-
- o the Right Arrow key to lengthen a horizontal line,
- o the Left Arrow key to shorten a horizontal line,
- o the Down arrow key to lengthen a vertical line, or
- o the Up arrow key to shorten a vertical line.
-
- 11.4.9 Creating, Moving, and Formatting Boxes
-
- Crystal Reports enables you to create free-form graphic boxes that you can
- use to highlight field data, blocks of data, or entire sections of your
- report.
-
- You can also use graphic boxes by themselves, as stand-alone graphic
- elements, to add visual interest to your report.
-
- Use the following procedure to create a box.
-
- 1. Click Insert|Box. A pencil cursor appears.
-
- 2. Set the tip of the cursor (the pointed end) where you want to anchor
- one corner of the box and drag the cursor towards the opposite corner
- with the left mouse button depressed.
-
- The box appears as you drag the cursor.
-
- 3. Release the mouse button when the box is the size you want it.
-
- NOTE: To format the box (set line style and width, line color, etc.),
- you use the Format|Box command.
-
- 11.4.10 Moving a Box
-
- You can move a graphic box using the mouse, or with the keyboard arrow keys.
- Use the following procedure to move a box using the mouse.
-
- 1. Click the box to select it.
-
- NOTE: You can select a box only with an arrow cursor. Position the I-beam
- near the box edge until it changes to an arrow and then click the edge of
- the box (not the center) to select it.
-
- 2. Drag the box where you want it.
-
- Make sure to keep the left mouse button depressed as you move it.
-
- 3. Release the mouse button once your box is in position.
-
- Use the following procedure to move a box with the arrow keys.
-
- 1. Click the box to select it.
-
- 2. Use the arrow keys on the keyboard to move the box up, down, right, or
- left until it is in the position that you want.
-
- NOTE: Crystal Reports displays box coordinates in the Status Bar to help
- you adjust the size and position of a graphic box. Using the status bar
- readings, you can easily place a box at a specific location on your report,
- or align two or more boxes with each other.
-
- 11.4.11 Formatting a Box
-
- Crystal Reports allows you to change:
-
- o the box style (the kind of line that outlines the box: single solid
- line, single dashed line, etc.),
- o the width (thickness) of the line that outlines the box, and
- o the color of the line that outlines the box.
- o Additionally, you can specify the fill for the box (whether the box
- is filled with a color or empty).
-
- You enter your box formatting specifications in the Box Format dialog box.
- Use the following procedure to format a box.
-
- 1. Select the box of interest and then select Format|Box.
-
- (Alternately, you can double click the box or select Change Format
- from the right mouse button menu.)
-
- The Box Format dialog box appears.
-
- 2. Enter your formatting instructions for the box.
-
- 3. Click OK when finished.
-
- Crystal Reports returns you to the Report Editor with the box formatted
- to your specifications.
-
- 11.4.12 Resizing a Box
-
- Once you have created a box, you can adjust its size using either the
- mouse or the keyboard arrow keys. Use the following procedure to resize a
- box using the mouse.
-
- 1. Select the box you wish to resize.
-
- 2. Move the cursor over one of the square sizing handles.
-
- NOTE: When the cursor is over one of the sizing handles, it changes to
- a double headed arrow (the resizing cursor).
-
- 3. Drag the handle until the box is the size you want:
- o If you want to change the height of the box, drag the handle at
- the top or the bottom.
- o If you want to change the width of the box, drag the handle at
- the right or the left side.
- o If you want to change both the height and the width at the
- same time, drag one of the handles at the corners of the box.
-
- Use the following procedure to resize a box using the arrow keys.
-
- 1. Using the mouse, select the box you want to resize.
-
- 2. While holding down the Shift key, press:
-
- o the Right Arrow key to make the box wider,
- o the Left Arrow key to make the box narrower,
- o the Down arrow key to make the box taller, or
- o the Up arrow key to make the box shorter.
-
-
-
-
-